/**
 * Created by Arnald on 2017/5/10.
 */
let schedule = require('node-schedule');
let match = require('./match.js');
let mem = require('../util/mem.js');
//let arenaA = require('./arenaModeA.js');

let cron = module.exports;

cron.init = function () {

    //arenaA.getInstance().start();
    // 开始动作
    schedule.scheduleJob('* * * * * *', function () {
        // 排队循环
        match.matchLineUp();
        // 检查排队时长
        match.matchTimeOut();

        //arenaA.getInstance().cron();
    });

    //schedule.scheduleJob('0 0 * * * *', function () {
    //    arenaA.getInstance().start();
    //});
    //schedule.scheduleJob('0 30 * * * *', function () {
    //    arenaA.getInstance().stop();
    //});
};